package com.etc.service;


import com.etc.entity.CommentResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@Component
@FeignClient(value = "cloud-nacos-search")
public interface SearchService {
//    楼栋查找
    @RequestMapping("building/findAllBuilding")
    public CommentResult findAllBuilding(@RequestParam(value = "start", required = false) Integer start,
                                         @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("building/findByAnyCondition")
    public CommentResult findBuildingByAnyCondition(@RequestBody Map<String, Object> map);

    @RequestMapping("building/findById/{id}")
    public CommentResult findBuildingById(@PathVariable("id")Integer id);

    @RequestMapping("building/findByPark/{id}")
    public CommentResult findBuildingByPark(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);


    //设备信息查找
    @RequestMapping("device/findAllDevice")
    public CommentResult findAllDevice(@RequestParam(value = "start", required = false) Integer start,
                                 @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("device/findByPark/{id}")
    public CommentResult findDeviceByPark(@PathVariable("id")Integer id, @RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("device/findByBuilding/{id}")
    public CommentResult findDeviceByBuilding(@PathVariable("id")Integer id, @RequestParam(value = "start", required = false) Integer start,
                                        @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("device/findByAnyCondition")
    public CommentResult findDeviceByAnyCondition(@RequestBody Map<String,Object> map, @RequestParam(value = "start", required = false) Integer start,
                                            @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("device/findById/{id}")
    public CommentResult findDeviceById(@PathVariable("id")Integer id);

    @RequestMapping("device/findByStatus/{status}")
    public CommentResult findByStatus(@PathVariable("status") Integer status);

    //住户查找
    @RequestMapping("household/findAllHousehold")
    public CommentResult findAllHousehold(@RequestParam(value = "start", required = false) Integer start,
                                          @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("household/findByAnyCondition")
    public CommentResult findHouseholdByAnyCondition(@RequestBody Map<String, Object> map, @RequestParam(value = "start", required = false) Integer start,
                                            @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("houselold/findById/{id}")
    public CommentResult findHouseholdById(@PathVariable("id")Integer id);


    @RequestMapping("house/findByRoom/{id}")
    public CommentResult findHouseholdByRoom(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("household/findInByTime")
    public CommentResult findHouseholdInByTime(@RequestParam("fromtime") String fromtime,@RequestParam("totime") String totime,@RequestParam(value = "start", required = false) Integer start,
                                      @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("household/findOutByTime")
    public CommentResult findHouseholdOutByTime(@RequestParam("fromtime") String fromtime,@RequestParam("totime") String totime,@RequestParam(value = "start", required = false) Integer start,
                                       @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("household/findByPark/{id}")
    public CommentResult findHouseholdByPark(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("household/findByBuilding/{id}")
    public CommentResult findHouseholdByBuilding(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                        @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("household/findByOwner/{id}")
    public CommentResult findHouseholdByOwner(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                     @RequestParam(value = "size", required = false) Integer size);

    //社区信息栏查找
    @RequestMapping("infobar/findById/{id}")
    public CommentResult findInfobarById(@PathVariable("id")Integer id);

    @RequestMapping("infobar/findByPark/{id}")
    public CommentResult findInfoByPark(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("infobar/findAllInfobar")
    public CommentResult findAllInfobar(@RequestParam(value = "start", required = false) Integer start,
                                        @RequestParam(value = "size", required = false) Integer size);


    //业主信息查找
    @RequestMapping("owner/findAllOwner")
    public CommentResult findAllOwner(@RequestParam(value = "start", required = false) Integer start,
                                      @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("owner/findById/{id}")
    public CommentResult findOwnerById(@PathVariable("id")Integer id);

    @RequestMapping("owner/findByPark")
    public CommentResult findOwnerByPark(@PathVariable("id")Integer id ,@RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("owner/findByBuilding")
    public CommentResult findOwnerByBuilding(@PathVariable("id")Integer id ,@RequestParam(value = "start", required = false) Integer start,
                                        @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("owner/findByRoom/{id}")
    public CommentResult findOwnerByRoom(@PathVariable("id")Integer id);

    //小区信息查询
    @RequestMapping("park/findAllPark")
    public CommentResult findAllPark(@RequestParam(value = "start", required = false) Integer start,
                                     @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("park/findByAnyCondition")
    public CommentResult findParkByAnyCondition(@RequestBody Map<String, Object> map,@RequestParam(value = "start", required = false) Integer start,
                                            @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("park/findById/{id}")
    public CommentResult findParkById(@PathVariable("id")Integer id);

    //房间信息查询
    @RequestMapping("room/findAllRoom")
    public CommentResult findAllRoom(@RequestParam(value = "start", required = false) Integer start,
                                     @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("room/findById/{id}")
    public CommentResult findRoomById(@PathVariable("id") Integer id);

    @RequestMapping("room/findByPark/{id}")
    public CommentResult findRoomByPark(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                    @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("room/findByBuilding/{id}")
    public CommentResult findRoomByBuilding(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                        @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("room/findByOwner/{id}")
    public CommentResult findRoomByOwner(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                     @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("room/findByRoomNum/{id}")
    public CommentResult findByRoomNum(@PathVariable("id")Integer id,@RequestParam(value = "start", required = false) Integer start,
                                       @RequestParam(value = "size", required = false) Integer size);

    @RequestMapping("room/findFreeRoom")
    public CommentResult findFreeRoom(@RequestParam(value = "start", required = false) Integer start,
                                      @RequestParam(value = "size", required = false) Integer size);
    @RequestMapping("room/findFreeRoomByBuilding/{id}")
    public CommentResult findFreeRoomByBuilding(@PathVariable("id")Integer id);

    @RequestMapping("room/findBusyRoom")
    public CommentResult findBusyRoom();

    @RequestMapping("room/findBusyRoomByBuilding/{id}")
    public CommentResult findBusyRoomByBuilding(@PathVariable("id") Integer id);

    //缴费单查询

    //查询逾期缴费信息
    @RequestMapping("payment/findAllExceed")
    public CommentResult findAllExceed();

    @RequestMapping("payment/findByStatus/{status}")
    public CommentResult findPaymentByStatus(@PathVariable("status") Integer status);

    @RequestMapping("payment/findByRoom/{id}")
    public CommentResult findPaymentByRoom(@PathVariable("id") Integer id);

    @RequestMapping("payment/findById/{id}")
    public CommentResult findPaymentById(@PathVariable("id") Integer id);

    @RequestMapping("payment/findAllPayment")
    public CommentResult findAllPayment();
}
